package cn.com.haopy.yue.ai.wx.web;

import cn.com.haopy.yue.ai.core.system.SystemConfig;
import cn.com.haopy.yue.ai.core.utils.ResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


/**
 * 系统配置
 */
@RestController
@RequestMapping("/haopyYueAi/sysConfig")
@RequiredArgsConstructor
@Slf4j
@Api(tags = "系统配置接口")
public class WxSysConfigController {


    /**
     * 用户协议
     *
     * @return
     */
    @GetMapping("/protocol")
    @ApiOperation(value = "用户协议")
    public Object protocol() {
        return ResponseUtil.ok(SystemConfig.getUserRiskWxProtocol());
    }


    /**
     * 隐私政策
     *
     * @return
     */
    @GetMapping("/privacy")
    @ApiOperation(value = "隐私政策")
    public Object privacy() {
        return ResponseUtil.ok(SystemConfig.getUserRiskWxPrivacy());

    }

    /**
     * 配置
     *
     * @return
     */
    @GetMapping("/config")
    @ApiOperation(value = "配置")
    public Object config() {
        Map<String, Object> data = new HashMap<>();
        data.put(SystemConfig.VIP_CHARGE_MONTH, SystemConfig.getVipchargeMonth());
        data.put(SystemConfig.VIP_CHARGE_MONEY, SystemConfig.getVipChargeMoney());
        return ResponseUtil.ok(data);

    }


}